﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PlanningGIS.Product
{
    /// <summary>
    /// 程序属性类
    /// </summary>
    [AttributeUsage(AttributeTargets.All, Inherited =true, AllowMultiple = true)]
    public class ProgramAttribute:System.Attribute
    {
        /// <summary>
        /// 程序名称
        /// </summary>
        private string name;

        /// <summary>
        /// 程序作用
        /// </summary>
        private string function;

        /// <summary>
        /// 程序关键词
        /// </summary>
        private string keyword;

        /// <summary>
        /// 程序摘要
        /// </summary>
        private string summary;

        public ProgramAttribute(string pName)
        {
            this.name = pName;
        }

        public ProgramAttribute(string pName, string pFunction)
        {
            this.name = pName;
            this.function = pFunction;
        }

        public ProgramAttribute(string pName, string pFunction, string pKeyword)
        {
            this.name = pName;
            this.function = pFunction;
            this.keyword = pKeyword;
        }

        public ProgramAttribute(string pName, string pFunction, string pKeyword,string pSummary)
        {
            this.name = pName;
            this.function = pFunction;
            this.keyword = pKeyword;
            this.summary = pSummary;
        }

        public virtual string Name
        {
            get
            {
                return this.name;
            }
        }

        public virtual string Function
        {
            get
            {
                return this.function;
            }
        }

        public virtual string Keyword
        {
            get
            {
                return this.keyword;
            }
        }

        public virtual string Summary
        {
            get
            {
                return this.summary;
            }
        }
    }
}
